﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelEmployees.aspx.cs" Inherits="CMS_Role_SelEmployees" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow:hidden;">
<head runat="server">
    <title>人员选择</title>

    <script>
        function GetId() {
            var getAllNodes = "";

            var tv = Get("span", "ttv");

            for (var i = 0; i < tv.length; i++) {
                var ck = tv[i].childNodes[0];
                if (ck.checked) {
                    getAllNodes += (ck.id.split("\\"))[1] + "|" + ck.value + ";";
                }
            }
            var v = getAllNodes.substring(0, getAllNodes.length - 1).split('|');

            window.opener.GetSonUser(v[0], v[1]);
            window.close();
            //return getAllNodes.substring(0, getAllNodes.length - 1);

        }


        function Get(tag, eltname) {

            var elts = document.getElementsByTagName(tag);
            var count = 0;
            var elements = [];
            for (var i = 0; i < elts.length; i++) {
                if (elts[i].getAttribute("name") == eltname) {
                    elements[count++] = elts[i];
                }
            }
            return elements;

        } 
      

     

    </script>

</head>
<body style="overflow: hidden; margin: 0px; overflow-y: hidden;">
    <form id="form1" runat="server">
    <div style="height: 500px">
        <div style="overflow: hidden; overflow-y: scroll; overflow-x: hidden; height: 100%;
            width: 350px; float: left;">
            <asp:TreeView ID="DptEmp" runat="server" ShowLines="True" Width="100%" ExpandDepth="1">
            </asp:TreeView>
        </div>
        <div style="float: right; height: 100%; margin-top: 240px;">
            <input id="btnOk" type="button" value=">>" style="margin-right: 20px; width: 100px;
                height: 30px;" onclick="GetId()"/>
        </div>
    </div>
    </form>
</body>
</html>
